﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucLogin.ascx.cs" Inherits="Client_UserControl_ucLogin" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<script language="javascript" type="text/javascript">
    function UpdateParentsLogin() {
        tb_remove();
        window.parent.location = "Products.aspx";
    }
</script>

<table border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td height="30" class="btTitle" style="padding-left:30px">
            Sign in to II-Online</td>
    </tr>
    <tr>
        <td>
            <asp:Panel ID="Panel1" runat="server" DefaultButton="cmdLogin">
                <table border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="center">
                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                <ContentTemplate>
                                    <asp:Label ID="lblMessage" runat="server" Visible="true" ForeColor="Red" Text=""></asp:Label>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <table border="0" style="padding: 10px 0 5px 10px;" cellspacing="6px">
                                <tr>
                                    <td style="text-align: right;width:100px">
                                        Email Address:
                                    </td>
                                    <td>
                                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txtUsername"
                                            WatermarkCssClass="clsWaterMarkRequiredField" 
                                            WatermarkText="email@user.com">
                                        </asp:TextBoxWatermarkExtender>
                                        <asp:TextBox ID="txtUsername" runat="server" CssClass="txtRegisterReq" ToolTip="Input email"
                                            ValidationGroup="validLogin" autocomplete="off" Width="300px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                            ControlToValidate="txtUsername" SetFocusOnError="true" Text="" ValidationGroup="validLogin"
                                            ErrorMessage="*" Display="Static"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        Password:
                                    </td>
                                    <td>
                                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server" TargetControlID="txtPassword"
                                            WatermarkCssClass="clsWaterMarkRequiredField" WatermarkText="Password">
                                        </asp:TextBoxWatermarkExtender>
                                        <asp:TextBox ID="txtPassword" runat="server" CssClass="txtRegisterReq" TextMode="Password"
                                            ToolTip="Input password" ValidationGroup="validLogin" Width="300px"> </asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                            ControlToValidate="txtPassword" SetFocusOnError="true" Text="" ValidationGroup="validLogin"
                                            ErrorMessage="*" Display="Static" ></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td align="left">
                                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                            <ContentTemplate>
                                                <asp:ImageButton ID="cmdLogin" runat="server" ImageUrl="~/Client/images/bt_login.png"
                                                    Style="border-width: 0px;" Text="Button" 
                                                    ValidationGroup="validLogin" onclick="cmdLogin_Click" />
                                            </ContentTemplate>
                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="cmdLogin" EventName="Click" />
                                            </Triggers>
                                        </asp:UpdatePanel>
                                    </td>
                                </tr>                                                                
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <table border="0" style="padding: 10px 0 5px 10px;">
                                <tr>
                                    <td style="width:105px">
                                    </td>
                                    <td style="padding-top: 10px; text-align: left; font-weight: bold; color: #000000;">
                                        <b>Forgotten your password?</b>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td style="text-align: left;" class="loginLnk">
                                        <asp:HyperLink ID="lnkForgotPwd" runat="server" Text="Click here" NavigateUrl="~/Client/LostPassword.aspx"></asp:HyperLink>&nbsp;to
                                        have your password reset.
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td style="padding-top: 20px; text-align: left; font-weight: bold; color: #000000;">
                                        Not a registered user?
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td style="text-align: left;" class="loginLnk">
                                        If you are a new customer.&nbsp;
                                        <asp:HyperLink ID="lnkRegister" runat="server" ToolTip="Sign up" Text="Register here"
                                            NavigateUrl="~/Client/Register.aspx">
                                        </asp:HyperLink>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </td>
    </tr>
    <tr>
        <td style="text-align: center">
            <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                <ProgressTemplate>
                    <asp:Image ID="imgLoading" runat="server" ToolTip="Loading..." ImageUrl="~/Client/images/loadingAnimation.gif"
                        Style="border-width: 0px;" />
                </ProgressTemplate>
            </asp:UpdateProgress>
        </td>
    </tr>
</table>

